package practice.library.gremlin_scala.example

/**
  * Created by lovepocky on 16/6/22.
  */

import com.thinkaurelius.titan.core.TitanFactory
import com.thinkaurelius.titan.graphdb.database.StandardTitanGraph
import gremlin.scala._
import org.apache.tinkerpop.gremlin.tinkergraph.structure.{TinkerFactory, TinkerGraph}
import practice.library.gremlin_scala.utility.CustomGremlinUtility._

object ConsoleExample {
	def graphOfNorthWind() = {
		NorthwindFactory.createGraph().asInstanceOf[StandardTitanGraph].asScala
	}

	def graphOfTinkerGraphBuildIn() = {
		TinkerFactory.createModern().asInstanceOf[StandardTitanGraph].asScala
	}

	def graphOfCassandraWith160() = {
		//TitanFactory.open("src/main/resources/titan/titan-cassandra-es-192.168.1.160.properties").asInstanceOf[StandardTitanGraph].asScala
		TitanFactory.open("src/main/resources/titan/titan-cassandra-es-192.168.1.160.properties").asScala
	}

	def graphOfScyllaWith163() = {
		TitanFactory.open("src/main/resources/titan/titan-cassandra-es-192.168.1.163.properties").asInstanceOf[StandardTitanGraph].asScala
	}

	def graphOfCustomSerializer(): ScalaGraph[StandardTitanGraph] = {
		TitanFactory.open("src/main/resources/titan/attr-titan-berkeleyje.properties").asInstanceOf[StandardTitanGraph].asScala
	}
}
